﻿Public Class Ingredientes


    Private Sub Ingredientes_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: esta línea de código carga datos en la tabla 'DbcoverDataSet2.Ingrediente' Puede moverla o quitarla según sea necesario.
        Me.IngredienteTableAdapter.Fill(Me.DbcoverDataSet2.Ingrediente)
    End Sub

    Private Sub IngredienteBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IngredienteBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.IngredienteBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.DbcoverDataSet2)
    End Sub

    Private Sub CantidadTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CantidadTextBox.KeyPress
        'ACEPTA SOLO NUMEROS
        If e.KeyChar >= Chr(48) And e.KeyChar <= Chr(57) Or e.KeyChar = Chr(8) Then
            e.Handled = False
        Else
            If e.KeyChar < Chr(48) Or e.KeyChar > Chr(57) Then
                e.Handled = True
            End If
        End If
    End Sub

    Private Sub NombreTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles NombreTextBox.KeyPress
        If e.KeyChar = ChrW(Keys.Enter) Then
            e.Handled = True
            SendKeys.Send("{TAB}")
        End If
    End Sub

    Private Sub NombreTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles NombreTextBox.TextChanged

    End Sub

    Private Sub UnidadMedidaTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles UnidadMedidaTextBox.KeyPress
        If e.KeyChar = ChrW(Keys.Enter) Then
            e.Handled = True
            SendKeys.Send("{TAB}")
        End If
    End Sub

    Private Sub UnidadMedidaTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles UnidadMedidaTextBox.TextChanged

    End Sub
End Class